﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Shop.Model;
using Shop.Framework.Keys;
using Shop.Framework.Services;

namespace Shop.Framework.Control {
    public class ShopDetailControl:ViewUserControl {
        public ShopDetail ShopDetail { get; set; }
        protected override void OnInit(EventArgs e) {
            
            ShopDetail = Session[SessionKey.ShopDetail] as ShopDetail;
            if (ShopDetail == null) {
                ShopService service = new ShopService();
                ShopDetail = service.GetShopDetail();
                Session[SessionKey.ShopDetail] = ShopDetail;
            }
            base.OnInit(e);
        }
    }
}
